import React, { PureComponent } from 'react';
import { Icon } from '@/components'
import {history} from 'umi';
// import {End} from '@/components/Result'
import testPaperImg from '@/assets/test-paper.png';
import styles from './index.less';

interface OwnerProps {
  
  
  status: 0|1|2|3|4 //0 考场尚未开放 1已通过正式考试 2 未通过模拟练习 3 未预约考试 
  onOK?: () => void;  // 确定
}
class Index extends PureComponent<OwnerProps,any> {
  
  render() {
    const {
      status
    } = this.props
    return (
      <div className={styles.before}>
        <div className={styles.test_paper}>
          <img alt="" src={testPaperImg} className={styles.test_paper_img} />
        </div>
        {status === 2 && <div>
          <div className={styles.tips}>
            <Icon className={styles.icon} type='iconic_certificate_wait' />
            <div className={styles.text}>请先通过模拟练习</div>
          </div>
          <div className={styles.button_wrap}>
            <div className={styles.reserve} onClick={()=>history.push('/exam/exercise')}>进入练习</div>
          </div>
        </div>}

        {status === 3 && <div>
          <div className={styles.tips}>
            <Icon className={styles.icon} type='iconic_certificate_wait' />
            <div className={styles.text}>您还没有预约考试</div>
          </div>
          <div className={styles.button_wrap}>
            <div className={styles.reserve} onClick={()=>router.push('/exam/booking')}>立即预约</div>
          </div>
        </div>}
          
        
      </div>
    )
  }
}

export default Index;

